package com.aaa.controller;

import com.aaa.entity.Fcart;
import com.aaa.entity.ResultMsg;
import com.aaa.service.impl.FcartServiceImpl;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import java.util.List;
import java.util.Map;

@RestController
@RequestMapping("fcart")
public class FcartController {
    @Resource
    FcartServiceImpl fcartService;
    @RequestMapping("add")
    public ResultMsg add(Fcart fcart){
        return ResultMsg.success(fcartService.save(fcart));
    }

    @RequestMapping("findcart")
    public ResultMsg find(){
        return ResultMsg.success(fcartService.ficart());
    }

    @RequestMapping("del")
    public ResultMsg del(Integer id){
        return ResultMsg.success(fcartService.del(id));
    }
    }
